package dao;

import org.hibernate.Session;
import org.hibernate.Transaction;

import entity.Foto;
import idao.IFotoDAO;

public class FotoDAO implements IFotoDAO{

	private Session session;

	@Override
	public void cadastra(Foto foto) {
		
		session = ConexaoBanco.getInstance();
		
		Transaction tx = session.beginTransaction();
		session.save(foto);
		tx.commit();
		session.close();
		
	}
}
